<ion-view title="移动审批" class="no-animation">
    <ion-header-bar class="bar-subheader" align-title="center" >
        <div class="row">
            <div class="col col-20"></div>
            <div class="col col-60">
                <div class="button-bar">
                    <a ng-class="btn.defaultbtnleft" ng-click="changeActive(true)">未处理</a>
                    <a ng-class="btn.defaultbtnright" ng-click="changeActive(false)">已处理</a>
                </div>
            </div>
            <div class="col col-20"></div>
        </div>

        <div ng-if="btn.checked" class="search-width">
            <label class="item item-input" ng-show="btn.checked">
                <i class="icon ion-search placeholder-icon"></i>
              <!--  <input type="text" placeholder="单据类型、单号、提交人"
                       ng-model="search.uncheckinfo" ng-keyup="getUncheckSearchDatas()">-->
                <input type="text" placeholder="单据类型、单号、提交人" ng-model="searchModel.uncheckinfo">
            </label>
            </div>
        <div ng-if="!btn.checked" class=" search-width">
            <label class="item item-input" ng-hide="btn.checked">
                <i class="icon ion-search placeholder-icon"></i>
               <!-- <input type="text" placeholder="单据类型、单号、提交人"
                       ng-model="search.checkinfo" ng-keyup="getCheckedSearchDatas()">-->
                <input type="text" placeholder="单据类型、单号、提交人"
                       ng-model="searchModel.checkedinfo">
            </label>
        </div>
    </ion-header-bar>
    <ion-content class="has-subheader" >
        <ion-refresher on-refresh="doRefresh()" pulling-text="下拉刷新..." refreshing-text="刷新中!" refreshing-icon="ion-loading-c">
        </ion-refresher>
        <!-- 未审批 -->
          <div class="list container" ng-if="btn.checked">
           <div class="list-hide-header"></div>
            <div class="list-li" ng-repeat="unlist in unchecklist|filter:searchModel.uncheckinfo">
              <div class="li-left">
                <div class="line"></div>
                <div class="circle0"></div>
              </div>
              <div class="li-right">
                    <div class="li-triangle"></div>
                    <div class="item item-icon-right" on-tap="saveOneInfo(unlist,'uncheckdetail')">
                        {{unlist.entity_typename}}：{{unlist.doc_no}}</br>
                        <span class="sign-time">
                        提交人：{{unlist.start_user_name}}&nbsp;&nbsp;&nbsp;&nbsp;
                        附件数：{{unlist.attachmentinfo_list.length}}<br>
                        提交时间：{{unlist.start_time}}</span>
                        <i class="icon ion-ios7-arrow-right"></i>
                    </div>
              </div>
            </div>
              <div class="nomoremsg" ng-hide="loadOver.uncheck">亲，没有更多数据了O(∩_∩)O</div>
          </div>

          <div class="list container" ng-if="!btn.checked">
            <div class="list-hide-header"></div>
            <div class="list-li" ng-repeat="x in checkedlist|filter:searchModel.checkedinfo">
              <div class="li-left">
                <div class="line"></div>
                <div class="circle"></div>
              </div>
              <div class="li-right">
                    <div class="li-triangle"></div>
                    <div class="item item-icon-right" on-tap="saveOneInfo(x,'checkdetail')">
                        {{x.entity_typename}}：{{x.doc_no}}</br>
                        <span class="sign-time">
                        审核人：{{x.approvalinfo_list[x.approvalinfo_list.length-1].approval_user}}
                        （{{x.approvalinfo_list[x.approvalinfo_list.length-1].process_action}}）<br>
                        审核时间：{{x.approvalinfo_list[x.approvalinfo_list.length-1].process_date}}</span>
                        <i class="icon ion-ios7-arrow-right"></i>
                    </div>
              </div>
            </div>
              <div class="nomoremsg" ng-hide="loadOver.checked">亲，没有更多数据了O(∩_∩)O</div>
          </div>

        <ion-infinite-scroll ng-if="obj.Scrolled" on-infinite="loadMore()"  distance="5%">
            <ion-spinner></ion-spinner>
        </ion-infinite-scroll>

    </ion-content>
</ion-view>